package com.youtills.core.admin;

/**
 * Created by IntelliJ IDEA.
 * User: ravi
 * Date: 7/22/12
 * Time: 5:18 PM
 * To change this template use File | Settings | File Templates.
 */
public enum LookupType implements ILookupType{

    RESOURCE_TYPE(1L, "Resource Type", "Resource Type"),
    USER_TYPE(2L, "User Type", "User Type"),
    CONTACT_TYPE(3L, "Contact Type", "Contact Type"),
    SCHOOL_STATUS(5L, "School Status", "School Status"),
    ADDRESS_TYPE(6L, "Address Type", "Address Type"),
    VENDOR_STATUS(7L, "Vendor Status", "Vendor Status"),
    VENDOR_CATEGORY(10L, "Vendor Category", "Vendor Category"),
    USER_PROPERTY( 12L, "User Property","User Property"),
    RESOURCE_PERMISSION_TYPE( 15L, "Resource Permission Type","Resource Permission Type"),
    ;
    private final Long type;
    private final String name;
    private final String description;

    private LookupType(Long type, String name, String description) {
        this.type = type;
        this.name = name;
        this.description = description;
    }

    public Long getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public String getDescription() {
        return description;
    }

    public static LookupType getByType(Long type){
        for(LookupType lookupType : values()){
            if(lookupType.type == type){
                return lookupType;
            }
        }
        return null;
    }
}
